package com.snail.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.snail.model.pojo.SysPermission;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Monica
 * @description 针对表【sys_permission】的数据库操作Service
 * @createDate 2025-07-16 10:22:25
 */
public interface SysPermissionService extends IService<SysPermission> {
    /**
     * 根据用户ID获取菜单树
     *
     * @param userId 用户ID
     * @return
     */
    List<SysPermission> getUserMenuTree(Long userId);

    /**
     * 删除菜单的同时删除角色对应的菜单权限
     */
    void deleteMenuAndRolePermission(Long id);
}
